﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KML
{
    public class KMLNetworkLink
    {
        private string name;
        private string fullName;
        private KMLNetworkLinkUrl url;

        internal KMLNetworkLink(string name, KMLNetworkLinkUrl url, string rootName)
        {
            this.name = name;
            this.fullName = rootName + "/" + name;
            this.url = url;
        }

        public string Name { get { return name; } }
        public string FullName { get { return fullName; } }
        public KMLNetworkLinkUrl Url { get { return url; } }
    }

    public struct KMLNetworkLinkUrl
    {
        public const int DefaultRefreshTime = 4; // secs

        private string href;
        private ViewRefreshMode refreshMode;
        private int refreshTime;

        public KMLNetworkLinkUrl(string href, ViewRefreshMode mode, int refreshTimeSecs)
        {
            this.href = href;
            this.refreshMode = mode;
            this.refreshTime = refreshTimeSecs;
        }

        public string Href { get { return href; } }
        public ViewRefreshMode RefreshMode { get { return refreshMode; } }
        public int RefreshTime { get { return refreshTime; } }
    }

    public enum ViewRefreshMode
    {
        OnStop
    }
}
